#include "Arduino.h"
#include <unity.h>
void hw_reg();
class testCase
{
public:
    testCase() { hw_reg(); };
    void loop(){};
};
class slope
{
    slope(uint16_t &var, uint16_t start_vaule, uint16_t finish_value, uint16_t step, int period)
    {
        this->slope_var = var;
        this->slope_value = start_vaule;
        this->finish_value = finish_value;
        this->slope_step = step;
        this->period = period;
    }
    void slope_loop()
    {
        if (millis() - last_tick >= period)
        {
            index++;
            if (index > slope_step)
                index = 0;
            slope_var = (finish_value - start_vaule) * index / slope_step + start_vaule;
            last_tick = millis();
        }
    }
    void loop()
    {
        slope_loop();
    }

private:
    uint16_t slope_step, start_vaule, finish_value, slope_var, index, slope_value;
    uint32_t period, last_tick;
};

void test_xa();
void test_xt();
void test_di_init();
void test_spiffs();
void test_pcf8563();
extern "C"{
void test_hw_reg();
void test_report(const char *msg);
}
int test_littlefs(void);
int test_bench(void);
int test_run(int);
